#pragma once
#include "loadUtils.h"
/**
 * @brief Struct for storing discountclient data
 */
struct DiscountClientVars{
	int clientid;
	char discountid[20];
	int startdate;
	int expirydate;
	int state;
};
/**
 * @brief Array of DiscountClientVars structs, allocated dynamically later on
 */
struct DiscountClientVars *discountclientdata;

/**
 * @brief keeps count of how many discountclients we have, also used for memory reallocation
 */
int discountclientcount;

/**
 * @brief Load discountclient file into memory
 *
 * @param filename
 *
 * @return return code
 */
int loadDiscountClients(char const *filename);

/**
 * @brief save discountclientdata to file
 *
 * @param filename
 *
 * @return return code
 */
int writeDiscountClients(char const *filename);

/**
 * @brief add a discountclient to the vector, reallocates if needed
 *
 * @param n
 */
void addDiscountClient(struct DiscountClientVars n);

/**
 * @brief removes a discountclient by index, find it yourself first ;)
 *
 * @param index
 */
void rmDiscountClient(int index);
